package com.blueocean_health.care.management.domain.dto;

import java.io.Serializable;
import java.util.Date;

import com.alibaba.fastjson.annotation.JSONField;
import com.alibaba.fastjson.serializer.SerializerFeature;
import com.blueocean_health.care.management.common.base.em.TimeType;
import com.blueocean_health.care.management.common.base.string.StringUtils;
import com.blueocean_health.care.management.common.base.time.TimeUtils;
import com.blueocean_health.care.management.common.excel.ExcelResources;
import com.blueocean_health.care.management.em.AccountFlagEnum;
import com.blueocean_health.care.management.em.OrderStatusEnum;
import com.blueocean_health.care.management.em.OrderTimeTypeEnum;
import com.blueocean_health.care.management.em.OrderTypeEnum;
import com.blueocean_health.care.management.em.PayStatusEnum;
import com.blueocean_health.care.management.em.ServiceTypeEnum;
import com.blueocean_health.care.management.em.SexEnum;

public class OrderSelectInfoEntity implements Serializable {
	private String Id;
    public String getId() {
		return Id;
	}

	public void setId(String id) {
		Id = id;
	}


    private Double totalAmount;//订单总金额
    
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;
    
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date beginTime;//开始时间

    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;//下单时间
    
    private String orderId;//订单号

    private String patientName;//患者姓名
    private String patientId;//患者ID
    private String hospitalName;//医院

    private String phone;//联系电话
    private String serviceType;
	private String timeType;//时间类型
	private String timeTypeName;//时间类型名字
	private String transType;//支付类型  5/6线上支付
	
	   public String getTransType() {
		return transType;
	}

	public void setTransType(String transType) {
		this.transType = transType;
	}

	   @ExcelResources(title = "时间类型", order = 8)
    public String getTimeTypeName() {
    	
    	
		return  getTimeType()==null||"".equals(getTimeType())?null:OrderTimeTypeEnum.valueOf("_"+getTimeType()).getVal();
	}

	public void setTimeTypeName(String timeTypeName) {
		this.timeTypeName = timeTypeName;
	}

	public String getTimeType() {
		return timeType;
	}

	public void setTimeType(String timeType) {
		this.timeType = timeType;
	}

	public String getServiceType() {
		return serviceType;
	}

	public void setServiceType(String serviceType) {
		this.serviceType = serviceType;
	}

	@SuppressWarnings("unused")
	private String serviceTypeName;



    private String orderStatus;
    @SuppressWarnings("unused")
	private String orderStatusName;//订单状态
    private String payStatus;//资金状态
    @SuppressWarnings("unused")
	private String payStatusName;
    private String workerNames;
    private String day;
    private String departmentName;//科室
    private String sex;
    private String sexName;
    private String diffDate;
    private String remainingTime;
    private String bedNumber;//病床号
    private String receiptNumber;//收据编号
    private String orderType;//订单类型 1:新入 2:续费  3:退款
    private String orderTypeName;//订单类型 1:新入 2:续费  3:退款
    private String superOrderId;// 父订单id
    private Boolean refundsFlag;//是否被退款  true被退款 false未被退款
    private String groupNamess ;//小组名称
    private String accountFlag ;//是否入账 0否 1是
    private String accountFlagName ;//是否入账 名称
    private Double totalPay;//总工资
    private String payProportion;//提测比例
    @ExcelResources(title = "提成比例", order = 5)
    public String getPayProportion() {
		return payProportion;
	}

	public void setPayProportion(String payProportion) {
		this.payProportion = payProportion;
	}

	public Double getTotalPay() {
		return totalPay;
	}

	public void setTotalPay(Double totalPay) {
		this.totalPay = totalPay;
	}

	public String getAccountFlag() {
		return accountFlag;
	}

	public void setAccountFlag(String accountFlag) {
		this.accountFlag = accountFlag;
	}
	@ExcelResources(title = "入账状态", order = 13)
	public String getAccountFlagName() {
		return  getAccountFlag()==null||"".equals(getAccountFlag())?null:AccountFlagEnum.valueOf("_"+getAccountFlag()).getVal();
	}

	public void setAccountFlagName(String accountFlagName) {
		this.accountFlagName = accountFlagName;
	}

	public String getGroupNamess() {
		return groupNamess;
	}

	public void setGroupNamess(String groupNamess) {
		this.groupNamess = groupNamess;
	}

	public Boolean getRefundsFlag() {
		return refundsFlag;
	}

	public void setRefundsFlag(Boolean refundsFlag) {
		this.refundsFlag = refundsFlag;
	}
	@ExcelResources(title = "订单类型", order = 7)
	public String getOrderTypeName() {
    	return getOrderType()==null||"".equals(getOrderType())?null:OrderTypeEnum.valueOf("_"+getOrderType()).getVal();
	}

	public void setOrderTypeName(String orderTypeName) {
		this.orderTypeName = orderTypeName;
	}

	public String getOrderType() {
		return orderType;
	}

	public void setOrderType(String orderType) {
		this.orderType = orderType;
	}

	public String getSuperOrderId() {
		return superOrderId;
	}

	public void setSuperOrderId(String superOrderId) {
		this.superOrderId = superOrderId;
	}

	public String getPatientId() {
		return patientId;
	}

	public void setPatientId(String patientId) {
		this.patientId = patientId;
	}
	@ExcelResources(title = "收据编号", order = 1)
	public String getReceiptNumber() {
		if (!StringUtils.isEmpty(receiptNumber)&&receiptNumber.indexOf("/")!=-1) {
			String[] split = receiptNumber.split("/");
			if(split.length>2){
				return split[0]+"/......";
			}
		} else {
			return receiptNumber;
		}
		return receiptNumber;
	}

	public void setReceiptNumber(String receiptNumber) {
		this.receiptNumber = receiptNumber;
	}

	public String getBedNumber() {
		return bedNumber;
	}

	public void setBedNumber(String bedNumber) {
		this.bedNumber = bedNumber;
	}

	public String getRemainingTime() {
		return remainingTime;
	}

	public void setRemainingTime(String remainingTime) {
		this.remainingTime = remainingTime;
	}

	public String getDiffDate() {
		return diffDate;
	}

	public void setDiffDate(String diffDate) {
		this.diffDate = diffDate;
	}


	public String getSex() {
		return sex;
	}

	public void setSex(String sex) {
		this.sex = sex;
	}

	public String getSexName() {
		return getSex()==null||"".equals(getSex())?null:SexEnum.valueOf("_"+getSex()).getVal();
	}

	public void setSexName(String sexName) {
		this.sexName = sexName;
	}

	public String getDay() {
		return day;
	}

	public void setDay(String day) {
		this.day = day;
	}
	public String getDepartmentName() {
		return departmentName;
	}
	
	public void setDepartmentName(String departmentName) {
		this.departmentName = departmentName;
	}

	private static final long serialVersionUID = 1L;

 

	@ExcelResources(title = "订单状态", order = 11)
    public String getOrderStatusName() {
		return getOrderStatus()==null||"0".equals(getOrderStatus())?null:OrderStatusEnum.valueOf("_"+getOrderStatus()).getVal();
	}
	@ExcelResources(title = "资金状态", order = 12)
	public String getPayStatusName() {
		return getPayStatus()==null||"0".equals(getPayStatus())?null:PayStatusEnum.valueOf("_"+getPayStatus()).getVal();
	}
//	//@ExcelResources(title = "总提成", order = 12,isNum=1)
//	public Double getTotalCost() {
//		return totalCost;
//	}
//
//	public void setTotalCost(Double totalCost) {
//		this.totalCost = totalCost;
//	}
	@ExcelResources(title = "订单金额", order = 4,isNum=1)
	public Double getTotalAmount() {
		return totalAmount;
	}

	public void setTotalAmount(Double totalAmount) {
		this.totalAmount = totalAmount;
	}
	@JSONField(format = "yyyy-MM-dd HH:mm:ss")
	public String getEndTime() {
		if(StringUtils.isEmpty(endTime)){
			return null;
		}
		return TimeUtils.getStringByDate(endTime, TimeType.yyyy_MM_dd_HH_mm_ss);
	}

	public void setEndTime(Date endTime) {
		this.endTime = endTime;
	}
	public String getBeginTime() {
		if(StringUtils.isEmpty(beginTime)){
			return null;
		}
		return TimeUtils.getStringByDate(beginTime, TimeType.yyyy_MM_dd_HH_mm_ss);
	}
	

	public void setBeginTime(Date beginTime) {
		this.beginTime = beginTime;
	}
	@ExcelResources(title = "录单日期", order = 10)
	public String getCreateTime() {
		if(StringUtils.isEmpty(createTime)){
			return null;
		}
		return TimeUtils.getStringByDate(createTime, TimeType.yyyy_MM_dd);
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
    @ExcelResources(title = "订单号", order = 9)
    public String getOrderId() {
        return orderId;
    }

    public void setOrderId(String orderId) {
        this.orderId = orderId == null ? null : orderId.trim();
    }
    @ExcelResources(title = "患者", order = 3)
    public String getPatientName() {
        return patientName;
    }

    public void setPatientName(String patientName) {
        this.patientName = patientName == null ? null : patientName.trim();
    }
 
    public String getHospitalName() {
        return hospitalName;
    }

    public void setHospitalName(String hospitalName) {
        this.hospitalName = hospitalName == null ? null : hospitalName.trim();
    }
    @ExcelResources(title = "联系电话", order = 6)
    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone == null ? null : phone.trim();
    }

    public String getServiceTypeName() {
        return getServiceType()==null||getServiceType().equals("")?null:ServiceTypeEnum.valueOf("_"+getServiceType()).getVal();
    }

    public void setServiceTypeName(String serviceTypeName) {
        this.serviceTypeName = serviceTypeName == null ? null : serviceTypeName.trim();
    }


    public String getOrderStatus() {
        return orderStatus;
    }

    public void setOrderStatus(String orderStatus) {
        this.orderStatus = orderStatus == null ? null : orderStatus.trim();
    }

    public String getPayStatus() {
        return payStatus;
    }

    public void setPayStatus(String payStatus) {
        this.payStatus = payStatus == null ? null : payStatus.trim();
    }
    @ExcelResources(title = "护工/小组", order = 2)
    public String getWorkerNames() {
        return workerNames;
    }

    public void setWorkerNames(String workerNames) {
        this.workerNames = workerNames == null ? null : workerNames.trim();
    }
}